package com.incito.crawl.common.utils.http;

import org.apache.http.client.methods.CloseableHttpResponse;

/**
 * Created with IntelliJ IDEA.
 * User: liu
 * Date: 14-5-26
 * Time: 下午7:28
 * To change this template use File | Settings | File Templates.
 */
public class HttpResp {


    private CloseableHttpResponse httpResponse;

    private String html;

    private byte[] imageBytes;

    private int statusCode;
    private String msg;
    private String contentType;
    private long contentLength;
    private String contentEncoding;

    private int requestNum = 0;

    private int errorNum = 0;

    private int sucNum = 0;

    public HttpResp(CloseableHttpResponse httpResponse, String html) {
        this.httpResponse = httpResponse;
        this.html = html;
    }

    public HttpResp(CloseableHttpResponse httpResponse, String html,byte[] imageBytes, int requestNum, int errorNum) {
        this.httpResponse = httpResponse;
        this.html = html;
        this.imageBytes = imageBytes;
        this.requestNum = requestNum;
        this.errorNum = errorNum;
    }

    public int getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(int statusCode) {
        this.statusCode = statusCode;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public byte[] getImageBytes() {
        return imageBytes;
    }

    public void setImageBytes(byte[] imageBytes) {
        this.imageBytes = imageBytes;
    }

    public String getContentType() {
        return contentType;
    }

    public void setContentType(String contentType) {
        this.contentType = contentType;
    }

    public long getContentLength() {
        return contentLength;
    }

    public void setContentLength(long contentLength) {
        this.contentLength = contentLength;
    }

    public void setContentLength(int contentLength) {
        this.contentLength = contentLength;
    }

    public String getContentEncoding() {
        return contentEncoding;
    }

    public void setContentEncoding(String contentEncoding) {
        this.contentEncoding = contentEncoding;
    }

    public String getHtml() {
        return html;
    }

    public void setHtml(String html) {
        this.html = html;
    }

    public CloseableHttpResponse getHttpResponse() {
        return httpResponse;
    }

    public void setHttpResponse(CloseableHttpResponse httpResponse) {
        this.httpResponse = httpResponse;
    }

    public int getRequestNum() {
        return requestNum;
    }

    public void setRequestNum(int requestNum) {
        this.requestNum = requestNum;
    }

    public int getErrorNum() {
        return errorNum;
    }

    public void setErrorNum(int errorNum) {
        this.errorNum = errorNum;
    }

    public int getSucNum() {
        return sucNum;
    }

    public void setSucNum(int sucNum) {
        this.sucNum = sucNum;
    }
}
